<template>
	<view>
		 <view class="desc" v-for="item,index in descList" :key="index" @click="goxq(item.lottery_id,item.lottery_no)" >
		 	  <div class="titleTop" >
				  <img src="../../static/images/zjl.png" alt="">
				  <text> {{item.lottery_no}} 期 </text>
				  <text>{{item.lottery_date}}开奖</text> 
			  </div>
			  <div class="quans">
				  <text class="quan" v-for="(ele,i) in item.lottery_res.split(',') ">{{ele}}</text>
			  </div>
		 </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				descList:[]
			}
		},
		onLoad(id){
			 uni.request({
			 	url:"http://api.aslegou.top/api/cphistory",
				data:{lottery_id:id.id},
				success: (res) => {
					console.log(res);
					this.descList=res.data.list.lotteryResList
					console.log(this.descList);
				}
			 })
			 
		},
		methods: {
			goxq(id,no){
				uni.navigateTo({
					url:`/pages/xq/xq?id=${id}&no=${no}`,
				})
			}
		}
	}
</script>

<style lang="scss">
.titleTop{
	 margin: 0 10px;
	 display: flex;
	 align-items: center;
	 
	img{
		width: 50px;
		height: 50px;
	}
}
.quans{
	margin: 0 10px;
	display: flex;
	 
	
}
.quan{
	display: block;
	width: 30px;
	margin-right: 10px;
	height: 30px;
	text-align: center;
	line-height: 30px;
	border: 1px solid #fe5e7e;
	border-radius: 50%;
}
</style>
